import request from '@/utils/request';

// 查询调差模版id
export async function checkInsTemplateData(params) {
  return request(`/osApi/insBillApi/checkTemplate`, {
    method: 'POST',
    body: params,
  });
}
// 查询调差模版id
export async function checkAccuTemplateData(params) {
  return request(`/osApi/accuBillApi/checkTemplate`, {
    method: 'POST',
    body: params,
  });
}
export async function getInsDiffData(params) {
  return request(`/osApi/insBillApi/getDiffData`, {
    method: 'POST',
    body: params,
  });
}
export async function getAccuDiffData(params) {
  return request(`/osApi/accuBillApi/getDiffData`, {
    method: 'POST',
    body: params,
  });
}

export async function getInsDiffDataDet(params) {
  return request(`/osApi/insBillApi/getDiffDataDet`, {
    method: 'POST',
    body: params,
  });
}
export async function getAccuDiffDataDet(params) {
  return request(`/osApi/accuBillApi/getDiffDataDet`, {
    method: 'POST',
    body: params,
  });
}

export async function insCancelGoBack(params) {
  return request(`/osApi/insBillApi/execCancelGoBack`, {
    method: 'POST',
    body: params,
  });
}
export async function accuCancelGoBack(params) {
  return request(`/osApi/accuBillApi/execCancelGoBack`, {
    method: 'POST',
    body: params,
  });
}

export async function insOkGoBack(params) {
  return request(`/osApi/insBillApi/execGoBack`, {
    method: 'POST',
    body: params,
  });
}

export async function accuOkGoBack(params) {
  return request(`/osApi/accuBillApi/execGoBack`, {
    method: 'POST',
    body: params,
  });
}

export async function getInsLsPkgName(params) {
  return request(`/osApi/insBillApi/getInsLsPkgName`, {
    method: 'POST',
    body: params,
  });
}

export async function getAccuLsPkgName(params) {
  return request(`/osApi/accuBillApi/getAccuLsPkgName`, {
    method: 'POST',
    body: params,
  });
}

export async function getjoinIdeList(params) {
  return request(`/osApi/joinIde/list`, {
    method: 'POST',
    body: params,
  });
}

export async function insAmoRecalculation(params) {
  return request(`/osApi/insBillApi/amoRecalculation`, {
    method: 'POST',
    body: params,
  });
}
export async function accuAmoRecalculation(params) {
  return request(`/osApi/accuBillApi/amoRecalculation`, {
    method: 'POST',
    body: params,
  });
}

export async function getInsExecAffirm(params) {
  return request(`/osApi/insBillApi/execAffirm`, {
    method: 'POST',
    body: params,
  });
}
export async function getAccuExecAffirm(params) {
  return request(`/osApi/accuBillApi/execAffirm`, {
    method: 'POST',
    body: params,
  });
}

export async function execImportData(params) {
  let url = '';
  if (params.assType === '1') {
    url = '/osApi/insBillApi/execImportData';
  } else {
    url = '/osApi/accuBillApi/execImportData';
  }
  return request(url, {
    method: 'POST',
    body: { billId: params.billId },
  });
}

export async function insImport(params) {
  return request(`/osApi/insBillApi/insImport`, {
    method: 'POST',
    body: params,
  });
}
export async function accuImport(params) {
  return request(`/osApi/accuBillApi/accuImport`, {
    method: 'POST',
    body: params,
  });
}

export async function updateInsDiffAmo(params) {
  return request(`/osApi/insBillApi/updateDiffAmo`, {
    method: 'POST',
    body: params,
  });
}
export async function updateAccuDiffAmo(params) {
  return request(`/osApi/accuBillApi/updateDiffAmo`, {
    method: 'POST',
    body: params,
  });
}
